<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="date" uri="/WEB-INF/tld/dateTag.tld" %>
<!-- 当前位置 strat -->

<c:choose>
    <c:when test="${tList.size()> 0 }">
        <div class="current-item-info">
            <div class="current-item-info-bd">
                <span class="current-item-index">日期索引</span>
                <ul class="current-item-date-list">
                    <c:forEach items="${tList}" var="l">
                        <li class="hasclassify"><a
                                class="data-${l} <c:if test="${!empty day && day eq l}">data-checked</c:if>"
                                onclick="Sport.setDate('${l}')">${l}</a></li>
                    </c:forEach>
                </ul>
            </div>
        </div>
        <div class="wrapper-content">
            <div class="sport-cell">
                <div class="every-bd">
                    <!-- 5月26日 开始 -->
                    <c:forEach items="${matchGroupList}" var="m">
                        <div class="someone-item date-time-${m.date}
					 		<c:choose>
  								<c:when test="${empty day || (!empty day && (empty m.date || day eq m.date))}">
  									block
  								</c:when>
   								<c:otherwise>
   									none
   								</c:otherwise>
							 </c:choose>
							 ">
                            <div class="sport-item" onclick="App.upDown('${m.date}')">
                                    ${date:formatData(m.date,'MM-dd','MM月dd日')}
                                <span class="small-toggle" data-state="show" id="slideDiv${m.date}">
									<i class="toggle-txt">收起</i> 
									<i class="fa fa-arrow-circle-up"></i>
								</span>
                            </div>
                            <table class="table table-striped table-sport-item slide-toggle-${m.date}">
                                <thead>
                                <tr>
                                    <th width="25%" style="text-align: left">比赛名称</th>
                                    <th width="16%" style="text-align: left">赛次</th>
                                    <th width="10%" style="text-align: left">时间</th>
                                    <th width="20%" style="text-align: left">场馆</th>
                                    <th style="text-align: left">备注</th>
                                    <th width="15%" >成绩信息</th>
                                </tr>
                                </thead>
                                <tbody>
                                <c:forEach items="${m.matchList}" var="h">
                                    <c:if test="${!h.flag}">
                                        <tr>
                                            <td style="text-align: left;vertical-align: middle">${h.classAllName}</td>
                                            <td style="text-align: left;vertical-align: middle">${h.resultType }</td>
                                            <td style="text-align: left;vertical-align: middle">${h.dataHour }</td>
                                            <td style="text-align: left;vertical-align: middle">${h.address }</td>
                                            <td style="text-align: left;vertical-align: middle">${h.backUp }</td>
                                            <c:choose>
                                                <c:when test="${h.status==1}">
                                                    <td><img src="${contextPath}static/images/rank.png" width="20px" height="20px"><a style="cursor: pointer;"
                                                           onclick="Sport.ShowMatchInfo1('${h.cid }','${h.classAllName }','${h.dataDate}','${group.cid }','${group.name }','${h.resultType }')">
                                                        成绩信息
                                                    </a>
                                                    </td>
                                                </c:when>

                                            <c:otherwise>
                                                <td style="width: 10%">
                                                </td>
                                            </c:otherwise>
                                            </c:choose>
                                        </tr>
                                    </c:if>
                                    <c:if test="${h.flag}">
                                        <tr>
                                            <td>${h.classAllName}</td>
                                            <td>${h.resultType }</td>
                                            <td>${h.dataHour }</td>
                                            <td>${h.address }</td>
                                            <c:choose>
                                                <c:when test="${h.status==1}">
                                                    <td><img src="${contextPath}static/images/rank.png" width="20px" height="20px"><a style="cursor: pointer;"
                                                           onclick="Sport.ShowMatchInfo1('${h.cid }','${h.classAllName }','${h.dataDate}','${group.cid }','${group.name }','${h.resultType }')">
                                                        成绩信息
                                                    </a>
                                                    </td>
                                                </c:when>

                                                <c:otherwise>
                                                    <td style="width: 10%">
                                                    </td>
                                                </c:otherwise>
                                            </c:choose>
                                        </tr>
                                        <div style="height: 10px;background-color: #5bc0de"></div>
                                    </c:if>

                                </c:forEach>
                                </tbody>
                            </table>
                        </div>
                    </c:forEach>
                    <!-- 5月31日 结束 -->
                </div>
            </div>
        </div>
    </c:when>

    <c:otherwise>
        <div class="current-item-info">
            <div class="current-item-info-bd">
                <span class="current-item-index">日期索引</span>
                <span class="current-item-index" style="font-size: 14px;">暂无索引</span>
            </div>
        </div>
        <div class="wrapper-content">
        <div class="sport-cell">
            <div class="every-bd">
            </div>
        </div>
    </c:otherwise>
</c:choose> 